from django.conf.urls import url
from . import views

urlpatterns = [

    url(r'^login/$', views.MerchantUserLoginView.as_view()),
    url(r'^sms_codes/(?P<mobile>1[3-9]\d{9})/$', views.SmsCodeView.as_view(), name='sms_codes'),
    url(r'^info/$', views.MerchantUserModelViewSet.as_view({'get': 'info'})),
    url(r'^choices_merchant/$', views.MerchantUserModelViewSet.as_view({'get': 'choices_merchant'})),
    url(r'^apply_admission/$', views.MerchantUserModelViewSet.as_view({'post': 'apply_admission'})),
    url(r'^operation_mall/$', views.MerchantUserModelViewSet.as_view({'post': 'operation_mall'})),
    url(r'^update_merchant/$', views.MerchantUserModelViewSet.as_view({'post': 'update_merchant'})),
    url(r'^order/$', views.OrderInfoModelViewSet.as_view({'get': 'list'})),
    url(r'^order/(?P<pk>\d+)/$', views.OrderInfoModelViewSet.as_view({'get': 'retrieve'})),
    url(r'^check_coupon/$', views.OrderInfoModelViewSet.as_view({'post': 'check_coupon'})),
    url(r'^use_coupon/$', views.OrderInfoModelViewSet.as_view({'post': 'use_coupon'})),
    url(r'^add_express/$', views.OrderInfoModelViewSet.as_view({'post': 'add_express'})),
    url(r'^delete_express/$', views.OrderInfoModelViewSet.as_view({'post': 'delete_express'})),
    url(r'^export_orderinfo/$', views.OrderInfoModelViewSet.as_view({'get': 'export_orderinfo'})),
    url(r'^batch_add_express/$', views.OrderInfoModelViewSet.as_view({'post': 'batch_add_express'})),
    url(r'^express_quest/$', views.ExpressQuestModelViewSet.as_view({'get': 'list'})),
    url(r'^express/$', views.ExpressModelViewSet.as_view({'get': 'list'})),
    url(r'^express/(?P<pk>\d+)/$', views.ExpressModelViewSet.as_view({'get': 'retrieve'})),
    url(r'^export_express/$', views.ExpressModelViewSet.as_view({'get': 'export_express'})),
    url(r'^expresstype/$', views.ExpressTypeModelViewSet.as_view({'get': 'list'})),
    url(r'^choices_expresstype/$', views.ExpressTypeModelViewSet.as_view({'get': 'choices_expresstype'})),
    url(r'^goods/$', views.GoodsModelViewSet.as_view({'get': 'list', 'post': 'create'})),
    url(r'^goods/(?P<pk>\d+)/$', views.GoodsModelViewSet.as_view({'get': 'retrieve', 'put': 'update'})),
    url(r'^sweep_code_identification/$', views.GoodsModelViewSet.as_view({'get': 'sweep_code_identification'})),
    url(r'^upload_image/$', views.GoodsModelViewSet.as_view({'post': 'upload_image'})),
    url(r'^category/$', views.GoodsCategoryModelViewSet.as_view({'get': 'list'})),
    url(r'^bill/$', views.MerchantBillModelViewSet.as_view({'get': 'list'})),
    url(r'^bill/(?P<pk>\d+)/$', views.MerchantBillModelViewSet.as_view({'get': 'retrieve'})),
    url(r'^export_merchant_bill/$', views.MerchantBillModelViewSet.as_view({'get': 'export_merchant_bill'})),
    url(r'^settlementrecord/(?P<pk>\d+)/$', views.MerchantSettlementRecordModelViewSet.as_view({'get': 'retrieve'})),
    url(r'^settlementrecord/$', views.MerchantSettlementRecordModelViewSet.as_view({'get': 'list'})),
    url(r'^export_settlementrecord/$', views.MerchantSettlementRecordModelViewSet.as_view({'get': 'export_settlementrecord'})),
    url(r'^monthly_bill/$', views.MerchantMonthlyBillModelViewSet.as_view({'get': 'list'})),
    url(r'^monthly_bill/(?P<pk>\d+)/$', views.MerchantMonthlyBillModelViewSet.as_view({'get': 'retrieve'})),
    url(r'^launchedgoods/$', views.LaunchedGoodsModelViewSet.as_view({'get': 'list'})),
    url(r'^launchedgoods/(?P<pk>\d+)/$', views.LaunchedGoodsModelViewSet.as_view({'get': 'retrieve', 'put': 'update', 'patch': 'partial_update'})),
    url(r'^applicationform/$', views.AfterSaleApplicationFormModelViewSet.as_view({'get': 'list'})),
    url(r'^applicationform/(?P<pk>\d+)/$', views.AfterSaleApplicationFormModelViewSet.as_view({'get': 'retrieve', 'put': 'update'})),
    url(r'^receive_goods/$', views.AfterSaleApplicationFormModelViewSet.as_view({'post': 'receive_goods'})),
    url(r'^deliver_goods/$', views.AfterSaleApplicationFormModelViewSet.as_view({'post': 'deliver_goods'})),
    url(r'^goodscomment/$', views.GoodsCommentModelViewSet.as_view({'get': 'list'})),

]